﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GodPl;
using GodPl.GameObjects;
using GodPl.GameObjects.Creatures;
using GodPl.WorldState;

namespace GodPl.Exceptions
{
    public class DistanceException : GameLogicException
    {
        public DistanceException(BriyyaAction action)
            : base(GenerateMessage(action))
        {
        }

        static string GenerateMessage(BriyyaAction action)
        {
            string actorName = action.Actor.GetType().Name;
            string targetName = action.Target.GetType().Name;
            string actionName = action.GetType().Name.Substring(1);

            string str = actorName + " is too far away from " + targetName
                + " to " + actionName + " it.";
            return str;
        }
    }

}

